<html>
  <body>
    <div id="container"></div>
  </body>
  <script>
    const s = document.querySelector('div').attachShadow({ mode: 'closed' })
    const p = document.createElement('p')
    p.innerText = 'inside'
    s.appendChild(p)
  </script>
</html>
